package kr.co.doriclassic.mypuppystory.infopuppy;

import kr.co.doriclassic.mypuppystory.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

public class IntentActivity extends Activity {
	String str1, str2;
	int pic;
	TextView tx1, tx2;
	ImageView img;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.jsonparser_intent);
		Intent intent = getIntent();
		str1 = intent.getExtras().getString("sub");
		str2 = intent.getExtras().getString("text");
		pic = intent.getExtras().getInt("img");
		tx1 = (TextView) findViewById(R.id.tx1);
		tx2 = (TextView) findViewById(R.id.tx2);
		img = (ImageView) findViewById(R.id.pic);
		tx1.setText(str1);
		tx2.setText(str2);
		if (pic < 0)
			img.setVisibility(View.GONE);
		else
			img.setImageResource(pic);
	}
}
